#include "basket.h"
#include "BlocksMatrix.h"
// cai gio
basket::basket(CBlocksMatrix* pParent) : CTetrad(pParent,vat_cairo)
{
}

basket::~basket()
{
}

bool basket::Rotate()
{
	bool bSuccess = false;
	
			bSuccess = true;
	return bSuccess;
}

bool basket::MoveLeft()
{
	bool bSuccess = false;
	
			m_iXPos--;
			bSuccess = true;
	return bSuccess;
}

bool basket::MoveRight()
{
	bool bSuccess = false;
	
			m_iXPos++;
			bSuccess = true;
	return bSuccess;
}

bool basket::MoveDown()
{
	bool bSuccess = false;
	
			bSuccess = true;
	return bSuccess;
}

void basket::Draw()
{
	int screenX=5, screenY=5; 

		m_pParentMatrix->GetScreenPosFromCell(m_iXPos,m_iYPos,screenX,screenY);
		m_pBlockImg->BlitImage(screenX,screenY);
}

void basket::DrawOnScreen(const TRectanglei& rect)
{
	int XPos = (rect.GetWidth() - 4*BLOCK_WIDTH)/2 + rect.m_Left;
	int YPos = (rect.GetHeight() - 1*BLOCK_HEIGHT)/2 + rect.m_Top;
	m_pBlockImg->BlitImage(XPos,YPos);
}

void basket::FillMatrix()
{

}

bool basket::IsValid()
{
	bool bValid = false;
		bValid = true;
	return bValid;
}
